package com.itfreer.bpm.timeliness.entity;

import java.io.Serializable;
import java.util.Date;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Id;
import javax.persistence.Index;
import javax.persistence.Table;

import org.springframework.beans.BeanUtils;

import com.itfreer.form.api.JdbcBaseEntity;
/**
 * 流程时效实体
 * @author gj
 *
 */
@Entity(name = "bpm_process_timeliness")
@Table(indexes = { @Index(name = "timep_act_defname", columnList = "act_defname"),
		@Index(name = "timep_s_exeid", columnList = "s_exeid"),
		@Index(name = "timep_s_business", columnList = "s_business"),
		@Index(name = "timep_tl_Type", columnList = "tl_Type"),
		@Index(name = "timep_process_type", columnList = "process_type")
		})
public class JdbcProcessTimeLinessEntity  implements JdbcBaseEntity<ProcessTimeLinessEntity>, Serializable{
	private static final long serialVersionUID = 4673423560339517162L;
	
	
	/**
	 * 数据库主键
	 */
	@Id
	@Column(name = "s_id")
	private String id;
	
	/**
	 * 流程定义id
	 */
	@Column(name = "act_defid")
	private String actdefid;
	/**
	 * 流程定义名称
	 */
	@Column(name = "act_defname")
	private String actdefname;
	
	/**
	 * 项目限时
	 */
	@Column(name = "tl_total")
	private Double tltotal;
	
	/**
	 * 流程实例Id
	 */
	@Column(name = "s_exeid")
	private String sexeid;

	
	/**
	 * 项目地址
	 */
	@Column(name = "prj_url")
	private String prjurl;
	
	/**
	 * 表单名称
	 */
	@Column(name = "prj_forname")
	private String prjforname;
	
	/**
	 * 表单视图
	 * 
	 */
	@Column(name = "prj_vi")
	private String prjvi;
	
	/**
	 * 项目名称
	 */
	@Column(name = "s_business")
	private String sbusiness;
	
	/**
	 * 项目主键
	 */
	@Column(name = "s_bussiness_id")
	private String sbussinessid;
	
	/**
	 * 启动时间
	 */
	@Column(name = "start_time")
	private Date starttime;
	
	/**
	 * 结束时间
	 */
	@Column(name = "end_time")
	private Date endtime;
	
	/**
	 * 时效时间
	 */
	@Column(name = "tl_time")
	private Long tltime;
	
	
	/**
	 * 时效说明
	 */
	@Column(name = "tl_caption")
	private String tlcaption;
	
	/**
	 * 时效类型（0未超时，1超时）
	 */
	@Column(name = "tl_Type")
	private String tltype;
	
	/**
	 * 流程状态（0在办，1办结，2、退件）
	 */
	@Column(name = "process_type")
	private String processtype;
	
	/**
	 * 当前环节
	 */
	@Column(name = "c_task_id")
	private String cTaskId;

	
	/**
	 * 当前环节名称
	 */
	@Column(name = "c_task_name")
	private String cTaskName;
	
	
	/**
	 * 计时开始时间
	 */
	@Column(name = "start_linesstime")
	private Date startlinesstime;
	
	
	/**
	 * 计时开始环节ID
	 */
	@Column(name = "start_taskid")
	private String starttaskid;
	
	
	/**
	 * 计时开始环节名称
	 */
	@Column(name = "start_taskname")
	private String starttaskname;
	
	/**
	 * 计时开始时间
	 */
	@Column(name = "end_linesstime")
	private Date endlinesstime;
	
	
	/**
	 * 计时开始环节ID
	 */
	@Column(name = "end_taskid")
	private String endtaskid;
	
	
	/**
	 * 计时开始环节名称
	 */
	@Column(name = "end_taskname")
	private String endtaskname;


	public String getActdefid() {
		return actdefid;
	}


	public void setActdefid(String actdefid) {
		this.actdefid = actdefid;
	}


	public String getActdefname() {
		return actdefname;
	}


	public void setActdefname(String actdefname) {
		this.actdefname = actdefname;
	}


	public Double getTltotal() {
		return tltotal;
	}


	public void setTltotal(Double tltotal) {
		this.tltotal = tltotal;
	}


	public String getSexeid() {
		return sexeid;
	}


	public void setSexeid(String sexeid) {
		this.sexeid = sexeid;
	}


	public String getId() {
		return id;
	}


	public void setId(String id) {
		this.id = id;
	}


	public String getPrjurl() {
		return prjurl;
	}


	public void setPrjurl(String prjurl) {
		this.prjurl = prjurl;
	}


	public String getPrjforname() {
		return prjforname;
	}


	public void setPrjforname(String prjforname) {
		this.prjforname = prjforname;
	}


	public String getPrjvi() {
		return prjvi;
	}


	public void setPrjvi(String prjvi) {
		this.prjvi = prjvi;
	}


	public String getSbusiness() {
		return sbusiness;
	}


	public void setSbusiness(String sbusiness) {
		this.sbusiness = sbusiness;
	}


	public String getSbussinessid() {
		return sbussinessid;
	}


	public void setSbussinessid(String sbussinessid) {
		this.sbussinessid = sbussinessid;
	}


	public Date getStarttime() {
		return starttime;
	}


	public void setStarttime(Date starttime) {
		this.starttime = starttime;
	}


	public Date getEndtime() {
		return endtime;
	}


	public void setEndtime(Date endtime) {
		this.endtime = endtime;
	}


	public Long getTltime() {
		return tltime;
	}


	public void setTltime(Long tltime) {
		this.tltime = tltime;
	}


	public String getTlcaption() {
		return tlcaption;
	}


	public void setTlcaption(String tlcaption) {
		this.tlcaption = tlcaption;
	}


	

	public String getcTaskId() {
		return cTaskId;
	}


	public void setcTaskId(String cTaskId) {
		this.cTaskId = cTaskId;
	}


	public String getcTaskName() {
		return cTaskName;
	}


	public void setcTaskName(String cTaskName) {
		this.cTaskName = cTaskName;
	}


	

	public String getTltype() {
		return tltype;
	}


	public void setTltype(String tltype) {
		this.tltype = tltype;
	}


	public String getProcesstype() {
		return processtype;
	}


	public void setProcesstype(String processtype) {
		this.processtype = processtype;
	}


	public Date getStartlinesstime() {
		return startlinesstime;
	}


	public void setStartlinesstime(Date startlinesstime) {
		this.startlinesstime = startlinesstime;
	}


	public String getStarttaskid() {
		return starttaskid;
	}


	public void setStarttaskid(String starttaskid) {
		this.starttaskid = starttaskid;
	}


	public String getStarttaskname() {
		return starttaskname;
	}


	public void setStarttaskname(String starttaskname) {
		this.starttaskname = starttaskname;
	}


	public Date getEndlinesstime() {
		return endlinesstime;
	}


	public void setEndlinesstime(Date endlinesstime) {
		this.endlinesstime = endlinesstime;
	}


	public String getEndtaskid() {
		return endtaskid;
	}


	public void setEndtaskid(String endtaskid) {
		this.endtaskid = endtaskid;
	}


	public String getEndtaskname() {
		return endtaskname;
	}


	public void setEndtaskname(String endtaskname) {
		this.endtaskname = endtaskname;
	}


	@Override
	public void from(ProcessTimeLinessEntity t) {
		BeanUtils.copyProperties(t, this);
	}


	@Override
	public ProcessTimeLinessEntity toEntity() {
		ProcessTimeLinessEntity toEntity = new ProcessTimeLinessEntity();
		BeanUtils.copyProperties(this, toEntity);
		return toEntity;
	}
}
